import { Component } from '@angular/core';

@Component({

    selector : 'my-app',

    template: `
        <h1>{{title}}</h1>
        <!--锚链接跳转组件-->
        <a routerLink="/dashboard">dashboard</a>
        <a routerLink="/heroes">Heroes</a>
        <!--跳转的组件在页面底部显示-->
        <router-outlet></router-outlet>
    `
})

export class AppComponent{

    title = 'Tour of Heroes';

}

